let http = require('./.././../../utils/http.js')
Page({
  /**
   * 页面的初始数据
   */
  data: {
    Res: {},  //接口数据
    list:[{
      name: '更换机油滤',
      price: '520.0'
    },{
      name: '更换防冻液',
      price: '140.0'
    }]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    http.postRequest('/mini/v1/appointment/info',{appointment_id: options.id}, res=> {
      res.data.newtime = http.transTime(res.data.created_at);
      res.data.kaishitime = http.transTime(res.data.start_time);
      res.data.jieshutime = http.transTime(res.data.end_time);
      this.setData({
        Res: res.data
      })
    })
  }
})